package com.bfs.anasit.util.log.log;


import org.slf4j.LoggerFactory;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Dependent;
import java.util.logging.Logger;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Named;

/**
 * Created by IntelliJ IDEA.
 * User: lukman
 * Date: 8/27/11
 * Time: 10:08 PM
 * To change this template use File | Settings | File Templates.
 */


public class LogFactory {

    @Produces
    @com.bfs.anasit.util.log.annotations.Logger
    public org.slf4j.Logger createLogger(InjectionPoint injectionPoint) {
        return LoggerFactory.getLogger(injectionPoint.getMember().getDeclaringClass());

    }

    @Produces
    public Logger createJDKLogger(InjectionPoint injectionPoint) {
        return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
    }


}
